package com.edu.study.base.lmsOrder.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.study.base.lmsOrder.mapper.LmsOrderMapper;
import com.edu.study.base.lmsOrder.domain.LmsOrder;
import com.edu.study.base.lmsOrder.service.ILmsOrderService;

/**
 * lmsOrderService业务层处理
 * 
 * @author zw
 * @date 2021-08-11
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class LmsOrderServiceImpl implements ILmsOrderService 
{
    @Autowired
    private LmsOrderMapper lmsOrderMapper;

    /**
     * 查询lmsOrder
     * 
     * @param id lmsOrderID
     * @return lmsOrder
     */
    @Override
    public LmsOrder selectLmsOrderById(String id)
    {
        return lmsOrderMapper.selectLmsOrderById(id);
    }

    /**
     * 查询lmsOrder列表
     * 
     * @param lmsOrder lmsOrder
     * @return lmsOrder
     */
    @Override
    public List<LmsOrder> selectLmsOrderList(LmsOrder lmsOrder)
    {
        return lmsOrderMapper.selectLmsOrderList(lmsOrder);
    }

    /**
     * 新增lmsOrder
     * 
     * @param lmsOrder lmsOrder
     * @return 结果
     */
    @Override
    public int insertLmsOrder(LmsOrder lmsOrder)
    {
        lmsOrder.setCreateTime(DateUtils.getNowDate());
        return lmsOrderMapper.insertLmsOrder(lmsOrder);
    }

    /**
     * 修改lmsOrder
     * 
     * @param lmsOrder lmsOrder
     * @return 结果
     */
    @Override
    public int updateLmsOrder(LmsOrder lmsOrder)
    {
        return lmsOrderMapper.updateLmsOrder(lmsOrder);
    }

    /**
     * 批量删除lmsOrder
     * 
     * @param ids 需要删除的lmsOrderID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderByIds(String[] ids)
    {
        return lmsOrderMapper.deleteLmsOrderByIds(ids);
    }

    /**
     * 删除lmsOrder信息
     * 
     * @param id lmsOrderID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderById(String id)
    {
        return lmsOrderMapper.deleteLmsOrderById(id);
    }
}
